<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arr = [1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4]

    let k = arr.reduce((prev, cur, index, arr) => {

        return prev + cur
    }, 10)
    console.log(k)
</script>
</body>
</html>